﻿@model TestUp.Models.AdminModels.CreateTestModel
@{
    ViewBag.Title = "CreateTest";
    Layout = "~/Views/Admin/_AdminLayout.cshtml";
}

<h2>Upload and create new test</h2>

@using (Html.BeginForm("CreateTest", "Admin", FormMethod.Post, new { style = "width: 50%", enctype = "multipart/form-data" }))
{
    <div style="border: 1px dashed gray; margin: 5px; padding: 5px">
        <div class="editor-label">
            @(Html.LabelFor(x => x.Test.TestName))
        </div>
        <div class="editor-field">
            @(Html.EditorFor(x => x.Test.TestName))
        </div>

        <div class="editor-label">
            @(Html.LabelFor(x => x.Test.Course))
        </div>
        <div class="editor-field">
            @(Html.Kendo().ComboBoxFor(x => x.Test.CourseId)
                  .Placeholder("Select course...")
                  .DataTextField("CourseName")
                  .DataValueField("CourseId")
                  .BindTo(Model.Courses)
                  .Suggest(true)
                  )
        </div>

        <h4>Select xml file with test</h4>

        @Html.Kendo().Upload().Multiple(false).Name("file")
    </div>
    <input class="k-button" type="submit" value="Create" />
}
